package com.shadow.baiqun.delegate.receive.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.shadow.core.delegate.ShadowDelegate;

import java.util.List;

/**
 * @author zy
 * on 2018/7/8
 */
public class FragmentAdapter extends FragmentPagerAdapter {
    private String[] mTab = new String[]{"预收货列表", "待入库列表"};
    private List<ShadowDelegate> mDelegates;
    public FragmentAdapter(FragmentManager fm,List<ShadowDelegate> list) {
        super(fm);
        mDelegates = list;
    }

    @Override
    public Fragment getItem(int position) {
        return mDelegates.get(position);
    }

    @Override
    public int getCount() {
        return mDelegates.size();
    }
    @Override
    public CharSequence getPageTitle(int position) {
        return mTab[position];
    }
}
